package com.ruoyi.service.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.KeepMapper;
import com.ruoyi.service.domain.Keep;
import com.ruoyi.service.service.IKeepService;
import com.ruoyi.common.support.Convert;

/**
 * 留存电量 服务层实现
 * 
 * @author john
 * @date 2019-01-04
 */
@Service
public class KeepServiceImpl implements IKeepService 
{
	@Autowired
	private KeepMapper keepMapper;

	/**
     * 查询留存电量信息
     * 
     * @param id 留存电量ID
     * @return 留存电量信息
     */
    @Override
	public Keep selectKeepById(Integer id)
	{
	    return keepMapper.selectKeepById(id);
	}
	
	/**
     * 查询留存电量列表
     * 
     * @param keep 留存电量信息
     * @return 留存电量集合
     */
	@Override
	public List<Keep> selectKeepList(Keep keep)
	{
	    return keepMapper.selectKeepList(keep);
	}
	
    /**
     * 新增留存电量
     * 
     * @param keep 留存电量信息
     * @return 结果
     */
	@Override
	public int insertKeep(Keep keep)
	{
	    return keepMapper.insertKeep(keep);
	}
	
	/**
     * 修改留存电量
     * 
     * @param keep 留存电量信息
     * @return 结果
     */
	@Override
	public int updateKeep(Keep keep)
	{
	    return keepMapper.updateKeep(keep);
	}

	/**
     * 删除留存电量对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteKeepByIds(String ids)
	{
		return keepMapper.deleteKeepByIds(Convert.toStrArray(ids));
	}
	
}
